package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallAppPush;
import com.appkubes.mall.core.po.MallAppPushExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallAppPushMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_app_push
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallAppPushSqlProvider.class, method="countByExample")
    long countByExample(MallAppPushExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_app_push
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallAppPushSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallAppPushExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_app_push
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_app_push",
        "where push_key = #{pushKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String pushKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_app_push
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_app_push (push_key, app_key, ",
        "push_type, client_id, ",
        "push_title, content, ",
        "transmission_info, version)",
        "values (#{pushKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{pushType,jdbcType=VARCHAR}, #{clientId,jdbcType=VARCHAR}, ",
        "#{pushTitle,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, ",
        "#{transmissionInfo,jdbcType=VARCHAR}, #{version,jdbcType=INTEGER})"
    })
    int insert(MallAppPush record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_app_push
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallAppPushSqlProvider.class, method="insertSelective")
    int insertSelective(MallAppPush record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_app_push
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallAppPushSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="push_key", property="pushKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="push_type", property="pushType", jdbcType=JdbcType.VARCHAR),
        @Result(column="client_id", property="clientId", jdbcType=JdbcType.VARCHAR),
        @Result(column="push_title", property="pushTitle", jdbcType=JdbcType.VARCHAR),
        @Result(column="content", property="content", jdbcType=JdbcType.VARCHAR),
        @Result(column="transmission_info", property="transmissionInfo", jdbcType=JdbcType.VARCHAR),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallAppPush> selectByExampleWithRowbounds(MallAppPushExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_app_push
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallAppPushSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="push_key", property="pushKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="push_type", property="pushType", jdbcType=JdbcType.VARCHAR),
        @Result(column="client_id", property="clientId", jdbcType=JdbcType.VARCHAR),
        @Result(column="push_title", property="pushTitle", jdbcType=JdbcType.VARCHAR),
        @Result(column="content", property="content", jdbcType=JdbcType.VARCHAR),
        @Result(column="transmission_info", property="transmissionInfo", jdbcType=JdbcType.VARCHAR),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallAppPush> selectByExample(MallAppPushExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_app_push
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "push_key, app_key, push_type, client_id, push_title, content, transmission_info, ",
        "version",
        "from mall_app_push",
        "where push_key = #{pushKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="push_key", property="pushKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="push_type", property="pushType", jdbcType=JdbcType.VARCHAR),
        @Result(column="client_id", property="clientId", jdbcType=JdbcType.VARCHAR),
        @Result(column="push_title", property="pushTitle", jdbcType=JdbcType.VARCHAR),
        @Result(column="content", property="content", jdbcType=JdbcType.VARCHAR),
        @Result(column="transmission_info", property="transmissionInfo", jdbcType=JdbcType.VARCHAR),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    MallAppPush selectByPrimaryKey(String pushKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_app_push
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallAppPushSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallAppPush record, @Param("example") MallAppPushExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_app_push
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallAppPushSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallAppPush record, @Param("example") MallAppPushExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_app_push
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallAppPushSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallAppPush record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_app_push
     *
     * @mbg.generated
     */
    @Update({
        "update mall_app_push",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "push_type = #{pushType,jdbcType=VARCHAR},",
          "client_id = #{clientId,jdbcType=VARCHAR},",
          "push_title = #{pushTitle,jdbcType=VARCHAR},",
          "content = #{content,jdbcType=VARCHAR},",
          "transmission_info = #{transmissionInfo,jdbcType=VARCHAR},",
          "version = #{version,jdbcType=INTEGER}",
        "where push_key = #{pushKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallAppPush record);
}